package com.atguigu.gmall.search.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * @author tangsy
 * @Description TODO
 * @date 2022/12/12 16:53
 * @Version 1.0
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
@Document(indexName = "person")
public class Person {

    @Id
    private Long id;

    @Field(value = "name",type = FieldType.Text)
    private String name;

    @Field(value = "age",type = FieldType.Integer)
    private Integer age;

}
